﻿using System;
using Autodesk.Revit.UI;
using HYElectricCommon;

namespace YArchitech.Revit.MEP.Calculator
{
	public class RequestHandler : IExternalEventHandler
	{
		public Request Request
		{
			get
			{
				return this.m_request;
			}
		}

		public string GetName()
		{
			return "R2013 External Event Sample";
		}

		public void Execute(UIApplication uiapp)
		{
			switch (this.Request.Take())
			{
			case RequestId.Range:
				CaculateCount.Range(uiapp);
				return;
			case RequestId.CurrentView:
				CaculateCount.CurrentViews(uiapp);
				return;
			case RequestId.CurrentProject:
				CaculateCount.CurrentsProject(uiapp);
				return;
			default:
				return;
			}
		}

		private Request m_request = new Request();

		public static IllCalDataSet illCalDataSet;
	}
}
